import request from "@/utils/request";

class UserAPI {
  /**
   * 获取当前登录用户信息
   *
   * @returns 登录用户昵称、头像信息，包括角色和权限
   */
  static getInfo() {
    return request({
      url: "/api/v1/users/me",
      method: "get",
    });
  }
  // 校验密码
  static check4psw(queryParams) {
    return request({
      url: "/api/setting/check4psw",
      method: "get",
      params: queryParams,
    });
  }
  // 修改密码
  static updatePsw(queryParams) {
    return request({
      url: "/api/setting/update_psw",
      method: "get",
      params: queryParams,
    });
  }
}

export default UserAPI;
